<template>
  <div class="content">
    <Header></Header>
    <van-row class="page-block">

      <template v-for="(item,index) in list">
      <div class="inx-public-title before">
        <span class="text">{{item.title}}</span>

        <router-link :to="{name:'svrDetail',query:{id:item.id}}" class="more">更多</router-link>
      </div>
      <div class="ad-buy-box m30">
        <router-link :to="{name:'svrDetail',query:{id:item.id}}">
          <van-image class="img" lazy-load :src="img(item.thumb)">
            <template v-slot:loading>
              <van-loading type="spinner" size="20"/>
            </template>
          </van-image>
        </router-link>
      </div>
      <router-link :to="{name:'svrOrder',query:{id:item.id}}" class="btn-svr">申请{{item.title}}</router-link>

      <van-divider />
      </template>

    </van-row>

    <Footer active="svr"></Footer>
  </div>
</template>

<script>
  import Footer from '../../components/footer'
  import Header from '../../components/index_header'

  export default {
    name: "service",
    components: {
      Footer,
      Header
    },
    data() {
      return {
          list:[],
      }
    },
    computed: {},
    mounted: function () {
      this.init();
    },
    methods: {
        init(){
            this.$api.svr.lists().then(res=>{
                var res=res.data;

                this.list=res.data.data;
            });
        }
    },
  }
</script>

<style lang="scss" scoped>
  @import "../../assets/scss/index.scss";
</style>
